home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 25
/
Volume 25 - JOGO DISK .iso
/
Games
/
the_jewel_hunter.swf
/
scripts
/
Scrolled_Background.as
< prev
Wrap
Text File
|
2006-06-13
|
588b
|
28 lines
classRoad = function()
{
this.init();
};
classRoad.prototype = new MovieClip();
Object.registerClass("Scrolled_Background",classRoad);
classRoad.prototype.init = function()
{
var _loc1_ = this;
_loc1_._name = "road";
_loc1_.road._y = 0;
Game.road = _loc1_;
_loc1_.onEnterFrame = _loc1_.movement;
};
classRoad.prototype.movement = function()
{
var _loc2_ = this;
var _loc1_ = _loc2_.road._y + Game.speed;
if(_loc1_ < 543)
{
_loc2_.road._y += Game.speed;
}
else
{
_loc2_.road._y = -543 + (_loc1_ - 543);
}
};